package com.yang.smsgateway.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.ThreadPoolExecutor;

@RestController
public class TestController {

    @Autowired
    private ThreadPoolExecutor cmppSubmitPool;

    @GetMapping("/test/threadpool")
    public String test() {
        cmppSubmitPool.execute(() -> {
            System.out.println(Thread.currentThread().getName());
        });
        return "ok!";
    }
}
